package ws.very.util.play2

import play.api.http._
import play.api.mvc._
trait MiniCtrl extends Results
  with BodyParsers with HttpProtocol with Status with HeaderNames
  with ContentTypes with AcceptExtractors with Rendering {
  
  protected implicit class ReqWrap(req: Request[AnyContent]) {
    def bodyEncodeds = req.body.asFormUrlEncoded.getOrElse(Map()).mapValues { _.mkString(",") }
    def queryParams = (req.queryString).mapValues { _.mkString(",") }
  }
}

trait MiniPlayApp extends com.typesafe.play.mini.Application with MiniCtrl